<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			
			//当前时间
			var day1 = new Date();
			
			//明年一月一日
			var day2 = new Date(day1.getFullYear()+22,06,02);
			
			//时间间隔
			//gettime()从1970.1.1 0:0:的毫秒数
			var span = day2.getTime() - day1.getTime();
			var spanDay = span/1000/60/60/24;
			
			document.write("间隔"+spanDay.toFixed(0)+"天")
		</script>
	</body>
</html>
